<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<script src="../js/jquery-3.6.0.min.js"></script>
<script src="../js/jquery.validate.min.js"></script>
<script src="../js/messages_zh.min.js"></script>
<script>

    $(function () {

        $("#empForm").validate({
            rules:{
                username:{
                    required:true
                },
                pwd:{
                    required:true
                }
            },
            messages:{
                username:{
                    required:"请输入用户名"
                },
                pwd:{
                    required:"请输入密码"
                }
            }
        })

    })

</script>
<body>
<form name="empForm" id="empForm" method="post" action="0.html">
    <label>用户名</label>：<input type="text" name="username">
    <br/>
    <label>密　码</label>：<input type="password" name="pwd">
</form>
</body>
</html>